document.addEventListener('DOMContentLoaded', function () {
    const items = document.querySelectorAll('.carousel-item');
    let index = 0;

    function showItem(index) {
        items.forEach(item => item.classList.remove('active'));
        items[index].classList.add('active');
    }

    showItem(index);

    function nextItem() {
        index++;
        if (index >= items.length) {
            index = 0;
        }
        showItem(index);
    }

    setInterval(nextItem, 3000); // Change image every 3 seconds
});